#ifndef CRESULTS_H
#define CRESULTS_H

#include <QString>
#include <QtSql>

/**
  * The CResults class sstores the project results to disk. To use it, create an instance of the lcass,
  */
class CResults
{
public:
    CResults();

    /// add a plugin - returns the plugin Id
    quint32 addPlugin(const QString &strName, const QString &strDescription);

    /// add a file - returns the file Id
    quint32 addFile(const QString &strFilePath);

    /// add a result: returns the result Id:
    quint32 addResult(quint32 nPluginId,
		    quint32 nFileId,
		    quint32 nLineStart,
		    quint32 nCol,
		    quint32 nLineCount,
		    quint32 nSeverity);

    /// get the full path to the database result set.
    QString getDBPath();

private:
    QSqlDatabase m_db;
    QString m_strDBName;

    QString getDBName();

};

#endif // CRESULTS_H
